package org.tps.project.controllers;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import org.tps.project.entities.Poste;
import org.tps.project.services.PosteServiceLocal;

@ManagedBean
@SessionScoped
public class PosteController {
	@EJB
	private PosteServiceLocal posteService;
	private Poste poste = new Poste();

	public Poste getPoste() {
		return poste;
	}

	public void setPoste(Poste poste) {
		this.poste = poste;
	}

	public String add() {

		posteService.create(poste);
		poste = new Poste();
		return null;
	}

}
